<template>
    <div class="app-contain">
        <div class="titleChart">
            <el-form v-loading="loading">
                <div class="sales-title">
                    <span class="tip"></span>
                    <span>收入概况</span>
                </div>
                <el-row class='blance'>
                    <el-col :span="3" class='blanceCon1' :offset='1'>
                        <div class="exuePlatform">e学云平台</div>
                        <div class="otherPlatform">其他平台</div>
                    </el-col>
                    <el-col :span="8" class='blanceCon1'>
                        <div class="faraway-left">昨日收入 (元)</div>
                        <el-row class="balance"><span>{{eXueYesterdayIncome}}</span></el-row>
                        <el-row class="balance2"><span>{{otherYesterdayIncome}}</span></el-row>
                    </el-col>
                    <el-col :span="2" class='blanceCon2'></el-col>
                    <el-col :span="5" class='blanceCon1'>
                        <div class="faraway-left">平台累计收入 (元)</div>
                        <el-row class="balance"><span>{{eXueAllIncome}}</span></el-row>
                        <el-row class="balance2"><span>{{otherAllIncome}}</span></el-row>
                    </el-col>
                </el-row>
            </el-form>
        </div>

        <recharge ref="balaRenovate"></recharge>
    </div>
</template>
 
<script>
    import { mapGetters } from 'vuex';
    import recharge from './recharge';
    import {countIncomeSettlementDetail} from 'api/oneCardSolution'
    export default {
        components: { recharge},
        data() {
            return {
                eXueYesterdayIncome: '0.00',
                otherYesterdayIncome: '0.00',
                eXueAllIncome: '0.00',
                otherAllIncome: '0.00',
                loading: false
            }
        },
        created() {
            this.searchSettledAmount();
        },
        computed: {
            ...mapGetters([
                'schoolId'
            ])
        },
        methods: {
            searchSettledAmount() {
                this.loading = true;
                countIncomeSettlementDetail(this.schoolId).then(response => {
                    this.loading = false;
                    this.eXueYesterdayIncome = response.data.content.eXue.yesterdayIncome;
                    this.otherYesterdayIncome = response.data.content.other.yesterdayIncome;
                    this.eXueAllIncome = response.data.content.eXue.allIncome;
                    this.otherAllIncome = response.data.content.other.allIncome;
                });
            }
        }
}
</script>
 
<style rel="stylesheet/scss" lang="scss" scoped>
@mixin tip-css {
    display: inline-block;
    height: 12px;
    width: 6px;
    border-left: 3px solid #ff5e2c;
    padding-left: 15px;
}
.app-contain{
    position: relative;
    .titleChart{
        background:#fff;
        padding:15px 10px;
        box-shadow:  0px 0px 5px 0px rgba(0, 0, 0, 0.1);
        -webkit-box-shadow:  0px 0px 5px 0px rgba(0, 0, 0, 0.1);
    }
    .blance{
        padding-bottom:50px;
    }
    .blanceCon2{
        height: 140px;
        border-left: 1px solid #ccc;
        margin-top: 65px;
    }
    .blanceCon1{
        font-family:'微软雅黑';
        font-size: 22px;
        line-height: 30px;
        color: #3D1F1F;
        text-align:center;
        padding-top:36px !important;
        .balance{
            font-family:'微软雅黑';
            font-size:36px;
            color: #343434;
            padding-top:50px;
        }
        .el-button{
            width:100px;
        }
    }
}
.sales-title {
    padding-left:10px;
    .tip {
        @include tip-css();
    }
    .current-time {
        padding-right: 8px;
    }
}
.exuePlatform{
    font-family:'微软雅黑';
    padding-top:80px;
    font-size:36px;
    color:#343434;
    line-height: 40px;
}
.otherPlatform{
    font-family:'微软雅黑';
    padding-top:50px;
    font-size:22px;
    color:#ccc;
    font-weight:600
}
.balance2{
    font-family:'微软雅黑';
    font-size:25px;
    color: #343434;
    color:#ccc;
    font-weight:600;
    padding-top:50px;
}
.faraway-left{
    padding-left:10px;
}
</style>